<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var radius = prompt('请输入圆半径：');
        radius = parseFloat(radius);
        var c = 2 * 3.14 * radius;
        var s = 3.14 * radius * radius;
        console.log('圆的周长为：' + c.toFixed(2));
        console.log('圆的面积为：' + s.toFixed(2));

    </script>
</body>

</html>